﻿using aier.business.logic;
using aier.dataaccess.model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.Http;

namespace aier.wx.api.selfhost.Controllers
{
    /// <summary>
    /// 学术推广统计
    /// </summary>
    [Authorize]
    [RoutePrefix("api/NetDoctorsStatistic")]
    public class NetDoctorsStatisticController : ApiController
    {
        public NetDoctorsStatisticBll netDoctorsStatisticBll { get; set; }
        public ApiTool apiTool { get; set; }

        /// <summary>
        /// 获取学术推广统计信息
        /// </summary>
        /// <param name="startdata">开始日间</param>
        /// <param name="enddata">结束日间</param>
        /// <returns></returns>
        [HttpGet]
        [ActionName("QryNetDoctorsStatistic")]
        public IHttpActionResult QryNetDoctorsStatistic(string startdata, string enddata)
        {
            UserInfo userInfo = apiTool.GetLoginUser(RequestContext);
            NetDoctorsStatisticView netDoctorsStatisticView = netDoctorsStatisticBll.QryNetDoctorsStatistic(startdata, enddata, userInfo.userid);
            return Ok<NetDoctorsStatisticView>(netDoctorsStatisticView);
        }
    }
}
